<include file="public@header"/>
<style type="text/css">
    .pic-list li {
        margin-bottom: 5px;
    }
</style>

</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li><a href="#">设置logo以及用户说图片</a></li>
    </ul>
    <form action="{:url('AdminLogo/add')}" method="post" class="form-horizontal js-ajax-form margin-top-20">
            <input name="id" value="{$images.id}" style="display: none">
        <div class="row">
            <div class="col-md-9">
                <table class="table table-bordered">

                       <tr>
                           <th style="text-align: center">logo图片（375*61）</th>
                           <td>
                               <div>
                                   <input type="hidden" name="logo[thumbnail]" class="form-control"
                                          id="js-thumbnail-input4" value="{$images.logo}">
                                   <div>
                                       <a href="javascript:uploadOneImage('图片上传','#js-thumbnail-input4');">
                                           <img src="{$logo}"
                                                id="js-thumbnail-input4-preview"
                                                width="135" style="cursor: pointer"/>
                                       </a>
                                       <input type="button" class="btn btn-sm btn-cancel-thumbnail4"
                                              onclick="$('#thumbnail-preview4').attr('src','__TMPL__/public/assets/images/default-thumbnail.png');$('#thumbnail').val('');return false;"
                                              value="取消图片">
                                   </div>
                               </div>
                           </td>
                       </tr>
                       <tr>
                           <th style="text-align: center">用户说标题图片（375*128）</th>
                           <td>
                               <div>
                                   <input type="hidden" name="guestshuo[thumbnail]" class="form-control"
                                          id="js-thumbnail-input5" value="{$images.guestshuo}">
                                   <div>
                                       <a href="javascript:uploadOneImage('图片上传','#js-thumbnail-input5');">
                                           <img src="{$guestshuo}"
                                                id="js-thumbnail-input5-preview"
                                                width="135" style="cursor: pointer"/>
                                       </a>
                                       <input type="button" class="btn btn-sm btn-cancel-thumbnail5"
                                              onclick="$('#thumbnail-preview5').attr('src','__TMPL__/public/assets/images/default-thumbnail.png');$('#thumbnail').val('');return false;"
                                              value="取消图片">
                                   </div>
                               </div>
                           </td>
                       </tr>
                </table>
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10">
                        <button type="submit" class="btn btn-primary js-ajax-submit">提交</button>
                    </div>
                </div>
            </div>

        </div>
    </form>
</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>

<script>
    $(function(){
        $('.btn-cancel-thumbnail2').click(function () {
            $('#js-thumbnail-input2-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png');
            $('#js-thumbnail-input2').val('');
        });
        $('.btn-cancel-thumbnail3').click(function () {
            $('#js-thumbnail-input3-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png');
            $('#js-thumbnail-input3').val('');
        });
        $('.btn-cancel-thumbnail4').click(function () {
            $('#js-thumbnail-input4-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png');
            $('#js-thumbnail-input4').val('');
        });
        $('.btn-cancel-thumbnail5').click(function () {
            $('#js-thumbnail-input5-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png');
            $('#js-thumbnail-input5').val('');
        });
    });
</script>
</body>
</html>